; 
assume cs:code
data segment
  db "welcome to masm!",0
data ends
code segment
start:
   ;调用显示
   mov dh,10      ;行号
   mov dl,10      ;列号
   mov cl,2
   mov ax,data
   mov ds,ax
   mov si,0h
   int 7ch

   mov ax,4c00h
   int 21h
   
code ends
end start

end start 




assume cs:codesg

codesg segment
start:
   ; 传送程序
   mov ax,cs
   mov ds,ax
   mov si,offset chengxu

   mov ax,0
   mov es,ax
   mov di,200h

   cld
   mov cx,offset chengxu_end-offset chengxu
   rep movsb
   ; 设置中断向量

   mov ax,0
   mov ds,ax

   mov word ptr ds:[7ch*4],200h
   mov word ptr ds:[7ch*4+2],0

   mov ax,4c00h
   int 21h
   ;程序
   chengxu:
   mov bx,0b800h
   mov es,bx

   mov al,160
   mul dh
   add dl,dl
   mov dh,0
   add ax,dx

   mov bx,ax

   chengxu1:
   mov al,ds:[si]
   cmp al,0
   je return
   ;将ds:si指向的数据移动到显存es:bx
   

  
   
   mov al,ds:[si]
   mov es:[bx],al
   mov es:[bx+1],cl

   inc si
   add bx,2

   jmp chengxu1
   
   return:
   iret
   chengxu_end:



codesg ends
end start
